//
//  BVMyOrderDetailCell.m
//  BuyVegetables1
//
//  Created by 叶思超 on 15/10/28.
//  Copyright (c) 2015年 叶思超. All rights reserved.
//

#import "BVMyOrderDetailCell.h"
#import "BVMyDetailOrder_assort.h"

@interface BVMyOrderDetailCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *shopsCountLabel;
@end

@implementation BVMyOrderDetailCell

- (void)awakeFromNib {
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.backgroundColor = [UIColor clearColor];
}

+ (instancetype)cell {
    return [[[NSBundle mainBundle] loadNibNamed:@"BVMyOrderDetailCell" owner:nil options:nil] lastObject];
}

- (void)setDetailOrder:(BVMyDetailOrder_assort *)detailOrder {
    _detailOrder = detailOrder;
    
    // 标题
    self.titleLabel.text = detailOrder.title;
    
    // 数量
    self.shopsCountLabel.text = [NSString stringWithFormat:@"x%@", detailOrder.number];
    
    // 价格
    self.priceLabel.text = [NSString stringWithFormat:@"¥%@", detailOrder.sum_money];
}
@end
